<!--填报课程考核实施计划-->
<template>
  <div class="assessment-container">
    <div class="search-container">
      <div class="search-container-left">
        <div class="search-container-item">
          <span>学期</span>
          <el-select
            v-model="xq"
            style="width: 70px"
            size="mini"
            placeholder="请选择"
          >
            <el-option
              v-for="item in xqList"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </div>
        <div class="search-container-item">
          <span>课程负责单位</span>
          <el-input
            style="width: 82px"
            size="mini"
            placeholder="请输入内容"
            v-model="v1"
          ></el-input>
        </div>
        <div class="search-container-item">
          <span>培养层次</span>
          <el-select
            v-model="pycc"
            style="width: 82px"
            size="mini"
            placeholder="请选择"
          >
            <el-option
              v-for="item in pyccList"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </div>
          <div class="search-container-item">
          <span>年级</span>
          <el-select
            v-model="tc"
            style="width: 62px"
            size="mini"
            placeholder="请选择"
          >
            <el-option
              v-for="item in tcList"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </div>
        <div class="search-container-item">
          <span>修习类型</span>
          <el-select
            v-model="xxlx"
            style="width: 82px"
            size="mini"
            placeholder="请选择"
          >
            <el-option
              v-for="item in xxlxList"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </div>
        <div class="search-container-item">
          <span>教员名称</span>
          <el-input
            style="width: 72px"
            size="mini"
            placeholder="请输入内容"
            v-model="v1"
          ></el-input>
        </div>
        <div class="search-container-item">
          <span>课程名称</span>
          <el-input
            style="width: 72px"
            size="mini"
            placeholder="请输入内容"
            v-model="v1"
          ></el-input>
        </div>
        <div class="search-button">
          <img src="../../../assets/assessment/icon-search.png" alt="" />
          <span>查询</span>
        </div>
      </div>
      <div class="search-container-right">
        <!--   -->
        <div class="import-button" @click="showExportReportDialogags = true">
          <img src="../../../assets/assessment/icon-import.png" alt="" />
          <span>录入补缓考成绩</span>
        </div>
         <div class="import-button" @click="showExportReportDialog = true">
          <img src="../../../assets/assessment/icon-import.png" alt="" />
          <span>录入第二次补缓考成绩</span>
        </div>
      </div>
    </div>
    <div class="plan-entry-table-container">
      <el-table
        :data="tableData"
        border
        style="width: 100%"
        class="table-data"
        row-class-name="row-class"
        cell-class-name="cell-class"
        header-row-class-name="header-row-class"
        header-cell-class-name="header-cell-class"
      >
        <el-table-column width="70" align="center" type="selection">
        </el-table-column>
        <el-table-column
          prop="lrcj"
          label="录入成绩"
          width="134"
          align="center"
          class-name=""
          label-class-name=""
        >
          <template slot-scope="scope">
            <div class="lucj-import-button" @click="toManualEntry()">
              <img src="../../../assets/assessment/lrcj-import.png" alt="" />
              <span @click="toMakeupScoreEntry">手动录入</span>
            </div>
            <div
              class="lucj-import-button"
              @click="showInportReportDialog = true"
            >
              <img src="../../../assets/assessment/lrcj-import.png" alt="" />
              <span>模板导入</span>
            </div>
          </template>
        </el-table-column>
        <el-table-column
          prop="dccjd"
          label="导出成绩单"
          width="112"
          align="center"
        >
          <template slot-scope="scope">
            <div class="lucj-expot-button">
              <img src="../../../assets/assessment/icon-export.png" alt="" />
              <span>分项</span>
            </div>
            <div class="lucj-expot-button">
              <img src="../../../assets/assessment/icon-export.png" alt="" />
              <span>总评</span>
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="xq" label="学期" width="79" align="center">
        </el-table-column>
        <el-table-column prop="jys" label="教研室" width="108" align="center">
        </el-table-column>
        <el-table-column prop="kcbh" width="153" align="center">
          <template slot-scope="scope" slot="header">
            <div>课程编号</div>
            <div>【课程名称】</div>
          </template>
          <template slot-scope="scope">
            <div>{{ scope.row.kcbhtitle }}</div>
            <div>{{ scope.row.kcbhcontent }}</div>
          </template>
        </el-table-column>
        <el-table-column prop="nj" label="年级" width="74" align="center">
        </el-table-column>
        <el-table-column prop="jxb" label="教学班" width="189" align="center">
        </el-table-column>
        <el-table-column
          prop="zybc"
          label="专业班次"
          width="292"
          align="center"
        >
        </el-table-column>
        <el-table-column prop="rkjy" label="任课教员" width="93" align="center">
        </el-table-column>
        <el-table-column prop="yl" label="应录" width="80" align="center">
        </el-table-column>
        <el-table-column prop="kxzy" width="105" align="center">
          <template slot-scope="scope" slot="header">
            <div>课下作业</div>
            <div>(已录/已审)</div>
          </template>
        </el-table-column>
        <el-table-column prop="kxcp" width="109" align="center">
          <template slot-scope="scope" slot="header">
            <div>课下测评</div>
            <div>(已录/已审)</div>
          </template>
        </el-table-column>
        <el-table-column prop="qzks" width="110" align="center">
          <template slot-scope="scope" slot="header">
            <div>期中考试</div>
            <div>(已录/已审)</div>
          </template>
        </el-table-column>
        <el-table-column prop="kzkh" align="center">
          <template slot-scope="scope" slot="header">
            <div>课终考核</div>
            <div>(已录/已审)</div>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <div class="bottom-block">
      <div class="export-button">
        <img src="../../../assets/assessment/icon-export.png" alt="" />
        <span>导出Excel</span>
      </div>
      <div class="text">授课教员名字后加“*”为课程负责人</div>
    </div>
     <el-dialog
      title="导出总评成绩单"
      :visible.sync="showExportReportDialog"
      width="1185px"
     
      class="manual-entry-containerass"
    >
      <div class="my-form-container" style="width:100%;height:100px">
       <el-row>
          <el-col :span="16">
            <div>标准体系名称</div>
            <div>
              <el-radio-group v-model="reportType">
          <el-radio
            :label="item.label"
            v-for="(item, index) in reportTypes"
            :key="index"
            class="large"
            >{{ item.value }}</el-radio
          >
        </el-radio-group>
            </div>
          </el-col>
        
        </el-row>
      

      </div>
      <span slot="footer" class="dialog-footer">
        <button @click="showExportReportDialog = false">保存</button>
      </span>
    </el-dialog>

     <el-dialog
      title="导出分项成绩单"
      :visible.sync="showExportReportDialogags"
      width="1185px"
    
      class="manual-entry-containerass" 
    >
      <div class="my-form-container" style="width:100%;height:195px">
       <el-row>
          <el-col :span="16">
            <div>标准体系名称</div>
            <div>
              <el-radio-group v-model="reportType">
          <el-radio
            :label="item.label"
            v-for="(item, index) in reportTypes"
            :key="index"
            class="large"
            >{{ item.value }}</el-radio
          >
        </el-radio-group>
            </div>
          </el-col>
        
        </el-row>
        <el-row  style="width:100%">
          <el-col :span="16">
            <div>标准体系名称</div>
            <div>
              <el-radio-group v-model="reportTypeags">
          <el-radio
            :label="item.label"
            v-for="(item, index) in reportTypesags"
            :key="index"
            class="large"
            >{{ item.value }}</el-radio
          >
          </el-radio-group>
            </div>
          </el-col>
        
        </el-row>

      </div>
      <span slot="footer" class="dialog-footer">
        <button @click="showExportReportDialogags = false">保存</button>
      </span>
    </el-dialog>



    <el-dialog
      title="按模板导入课程成绩"
      :visible.sync="showInportReportDialog"
      class="import-report-container"
      width="983px"
    >
      <div>
        <span>请选择数据文件：</span>
        <input type="text" v-model="filepath" />
        <div @click="changeInputFile()">
          <span>浏览</span>
          <input
            type="file"
            id="theFile"
            name="theFile"
            onchange="document.getElementById('theFilePath').value=this.value"
          />
        </div>
        <div>下载数据模板文件</div>
      </div>
      <span slot="footer" class="dialog-footer">
        <button class="green" @click="showInportReportDialog = false">
          提交
        </button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      xq: "2020春",
      xqList: [
        {
          value: "2020春",
          label: "2020春",
        },
        {
          value: "2020夏",
          label: "2020夏",
        },
      ],
       tc: "一年级",
      tcList: [
        {
          value: "一年级",
          label: "一年级",
        },
        {
          value: "二年级",
          label: "二年级",
        },
      ],
      pycc: "大专",
      pyccList: [
        {
          value: "大专",
          label: "大专",
        },
        {
          value: "本科",
          label: "本科",
        },
      ],
      xxlx: "必修",
      xxlxList: [
        {
          value: "选修",
          label: "选修",
        },
        {
          value: "必修",
          label: "必修",
        },
      ],
      tableData: [
        {
          lrcj: "",
          dccjd: "",
          xq: "2021春",
          jys: "政治教研室",
          kcbhtitle: "061029(博士课)",
          kcbhcontent: "话语分析专题研究",
          nj: "2021",
          jxb: "2021-(博士课)话语分析专题研究jxb-1",
          zybc: "021英语语言学",
          yzjy: "张某某",
        },
        {
          lrcj: "",
          dccjd: "",
          xq: "2021夏",
          jys: "政治教研室",
          kcbhtitle: "061029(博士课)",
          kcbhcontent: "话语分析专题研究",
          nj: "2021",
          jxb: "2021-(博士课)话语分析专题研究jxb-1",
          zybc: "021英语语言学",
          yzjy: "张某某",
        },
      ],
      v1: "",
      showExportReportDialog: false,
      showExportReportDialogags: false,
      reportType: "按教学班导出",
      reportTypes: [
        { label: "按教学班导出", value: "按教学班导出" },
        { label: "按课程导出", value: "按课程导出" },
      ],
       reportTypeags: "课下作业",
      reportTypesags: [
        { label: "课下作业", value: "课下作业" },
        { label: "课下测评", value: "课下测评" },
        { label: "期中考试", value: "期中考试" },
        { label: "课终考核", value: "课终考核" },
      ],
    };
  },
  methods: {
    toManualEntry() {
      this.$router.push("/admin/testa/manualEntrybcc");
    },
    toMakeupScoreEntry() {
      this.$router.push("/admin/testa/entryResultsbcc");
    },
  },
};
</script>
<style lang="less" scoped>
.assessment-container {
  .export-report-container {
    .el-dialog__body {
      padding: 64px 0 64px 50px;
      .el-radio {
        margin-right: 79px;
      }
    }
    .el-dialog__footer {
      padding-bottom: 103px;
    }
  }
 .import-report-container {
    .el-dialog__body {
      padding-left: 165px;
      padding-top: 71px;
      padding-bottom: 60px;
      > div {
        > span {
          font-size: 18px;
          font-weight: bold;
          line-height: 20px;
          color: #004ca7;
          vertical-align: middle;
        }
        > input {
          width: 254px;
          height: 25px;
          border: 1px solid #004ca7;
          opacity: 1;
          border-radius: 4px;
          padding-left: 5px;
          margin-right: 8px;
          color: #004ca7;
          vertical-align: middle;
        }
        > div {
          display: inline-block;
          font-size: 18px;
          padding: 1px 10px;
          border-radius: 4px;
          vertical-align: middle;
          cursor: pointer;
          &:nth-child(3) {
            color: rgba(2, 200, 108, 1);
            background: #f1fff8;
            border: 1px solid #02c86c;
            position: relative;
            margin-right: 20px;
            > input {
              width: 0px;
              position: absolute;
              left: 0;
              opacity: 1;
              cursor: pointer;
            }
          }
          &:nth-child(4) {
            color: rgba(82, 48, 233, 1);
            background: rgba(235, 230, 255, 1);
            border: 1px solid rgba(82, 48, 233, 1);
          }
        }
      }
    }
    .el-dialog__footer {
      padding-bottom: 76px;
      .green {
        padding: 1px 17px;
      }
    }
  }
  .manual-entry-container {
    .el-dialog__body {
      > div {
        width: 1014px;
        border: 1px solid rgba(0, 76, 167, 0.8);
        border-radius: 6px;
        margin: 0 auto;
        > div {
          border-bottom: 1px solid rgba(0, 76, 167, 0.39);
          &:last-child {
            border-bottom: none;
          }
          > div {
            display: flex;
            > div {
              height: 96px;
              display: flex;
              align-items: center;
              justify-content: center;
              &:nth-child(1) {
                width: 420px;
                text-align: center;
                font-size: 16px;
                font-weight: bold;
                color: #004ca7;
                background: rgba(77, 129, 192, 0.1);
              }
              &:nth-child(2) {
                padding-left: 19px;
              }
            }
          }
        }
      }
    }
    .el-dialog__footer {
      padding-bottom: 43px;
    }
    .dialog-footer {
      > button {
        width: 87px;
        height: 36px;
        background: #fff6ef;
        border: 1px solid #f3b815;
        border-radius: 6px;
        background: rgba(255, 246, 239, 1);
        font-size: 18px;
        color: #f3b815;
      }
    }
  }
  .manual-entry-containerass {
    .el-dialog__body {
     
      > div {
        width: 1014px;
        border: 1px solid rgba(0, 76, 167, 0.8);
        border-radius: 6px;
        margin: 0 auto;
        > div {
          border-bottom: 1px solid rgba(0, 76, 167, 0.39);
          &:last-child {
            border-bottom: none;
          }
          > div {
            display: flex;
            > div {
              width: 900px;
              height: 96px;
              display: flex;
              align-items: center;
              justify-content: center;
              &:nth-child(1) {
                width: 420px;
                text-align: center;
                font-size: 16px;
                font-weight: bold;
                color: #004ca7;
                background: rgba(77, 129, 192, 0.1);
              }
              &:nth-child(2) {
                padding-left: 19px;
              }
            }
          }
        }
      }
    }
    .el-dialog__footer {
      padding-bottom: 43px;
    }
    .dialog-footer {
      > button {
        width: 87px;
        height: 36px;
        background: #fff6ef;
        border: 1px solid #f3b815;
        border-radius: 6px;
        background: rgba(255, 246, 239, 1);
        font-size: 18px;
        color: #f3b815;
      }
    }
  }
}
.plan-entry-table-container {
  margin-top: 30px;
  .el-table td,
  .el-table th.is-leaf,
  .el-table--border,
  .el-table--group {
    border-color: #c7d7eb;
  }
  .el-table__header tr,
  .el-table__header th {
    padding: 0;
    height: 76px;
    background-color: #edf2f9;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    line-height: 20px;
    color: #004ca7;
  }
  .el-table__body tr,
  .el-table__body td {
    padding: 0;
    height: 86px;
  }
  .el-checkbox__inner:hover {
    border-color: #004ca7;
  }
  .el-checkbox__inner {
    border: 1px solid #004ca7;
    border-radius: 0;
  }
  .el-checkbox__input.is-checked .el-checkbox__inner,
  .el-checkbox__input.is-indeterminate .el-checkbox__inner {
    background-color: #004ca7;
    border-color: #004ca7;
  }
  .el-checkbox__input.is-checked + .el-checkbox__label {
    color: #004ca7;
  }
  .el-checkbox.is-bordered.is-checked {
    border-color: #004ca7;
  }
  .el-checkbox__input.is-focus .el-checkbox__inner {
    border-color: #004ca7;
  }
  .export-button {
    background: #fff6ef;
    border: 1px solid #f3b815;
    width: auto;
    height: 28px;
    line-height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    box-sizing: border-box;
    > span {
      font-size: 16px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #f3b815;
    }
    > img {
      width: 16px;
      height: 16px;
      margin-right: 5px;
    }
  }

  .lucj-import-button {
    .export-button;
    width: 116px;
    margin: 0 auto 12px;
    background: #f1fff8;
    border: 1px solid #02c86c;
    &:last-child {
      margin-bottom: 0px;
    }
    > span {
      color: #02c86c;
    }
  }
  .lucj-expot-button {
    .export-button;
    background: #fff6ef;
    border: 1px solid #f3b815;
    width: 81px;
    margin: 0 auto 12px;
    &:last-child {
      margin-bottom: 0px;
    }
    > span {
      color: #f3b815;
    }
  }
}
</style>

<style lang="less" scoped>
@import "../../../styles/print-entry.less";
.plan-entry-table-container {
  margin-top: 30px;
  .table-data {
    width: 100%;
    border: 0.8px solid #004ca7;
    border-radius: 9px;
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #004ca7;
  }
}
</style>